-module('ex_7.21_single_pair_implicit_entries').

-include_lib("eunit/include/eunit.hrl").

-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").

single_test_() ->
    ?_assertMatch(
      {yamerl_parser,
        {file,?FILENAME},
        [],
        <<>>,
        74,
        true,
        [],
        0,
        75,
        4,
        1,
        false,
        3,
        28,
        utf8,
        false,
        undefined,
        _,
        _,
        [],
        {bcoll,root,0,-1,1,1,-1,1,1},
        false,
        false,
        false,
        [{impl_key,false,false,undefined,undefined,1,1}],
        false,
        false,
        _,
        [],
        0,
        42,
        41,
        undefined,
        undefined,
        _,
        false,
        [],
        [
          {yamerl_stream_end,3,28},
          {yamerl_doc_end,3,28},
          {yamerl_collection_end,3,28,block,sequence},
          {yamerl_collection_end,3,27,flow,sequence},
          {yamerl_collection_end,3,27,flow,mapping},
          {yamerl_scalar,3,18,
            {yamerl_tag,3,18,{non_specific,"?"}},
            flow,plain,"adjacent"},
          {yamerl_mapping_value,3,17},
          {yamerl_collection_end,3,16,flow,mapping},
          {yamerl_scalar,3,12,
            {yamerl_tag,3,12,{non_specific,"?"}},
            flow,plain,"like"},
          {yamerl_mapping_value,3,10},
          {yamerl_scalar,3,6,
            {yamerl_tag,3,6,{non_specific,"?"}},
            flow,plain,"JSON"},
          {yamerl_mapping_key,3,6},
          {yamerl_collection_start,3,5,
            {yamerl_tag,3,5,{non_specific,"?"}},
            flow,mapping},
          {yamerl_mapping_key,3,5},
          {yamerl_collection_start,3,5,
            {yamerl_tag,3,5,{non_specific,"?"}},
            flow,mapping},
          {yamerl_sequence_entry,3,5},
          {yamerl_collection_start,3,3,
            {yamerl_tag,3,3,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,3,1},
          {yamerl_collection_end,2,23,flow,sequence},
          {yamerl_collection_end,2,23,flow,mapping},
          {yamerl_scalar,2,7,
            {yamerl_tag,2,7,{non_specific,"?"}},
            flow,plain,"empty key entry"},
          {yamerl_mapping_value,2,5},
          {yamerl_scalar,2,5,
            {yamerl_tag,2,5,{non_specific,"?"}},
            flow,plain,[]},
          {yamerl_mapping_key,2,5},
          {yamerl_collection_start,2,5,
            {yamerl_tag,2,5,{non_specific,"?"}},
            flow,mapping},
          {yamerl_sequence_entry,2,5},
          {yamerl_collection_start,2,3,
            {yamerl_tag,2,3,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,2,1},
          {yamerl_collection_end,1,21,flow,sequence},
          {yamerl_collection_end,1,21,flow,mapping},
          {yamerl_scalar,1,12,
            {yamerl_tag,1,12,{non_specific,"?"}},
            flow,plain,"separate"},
          {yamerl_mapping_value,1,10},
          {yamerl_scalar,1,5,
            {yamerl_tag,1,5,{non_specific,"?"}},
            flow,plain,"YAML"},
          {yamerl_mapping_key,1,5},
          {yamerl_collection_start,1,5,
            {yamerl_tag,1,5,{non_specific,"?"}},
            flow,mapping},
          {yamerl_sequence_entry,1,5},
          {yamerl_collection_start,1,3,
            {yamerl_tag,1,3,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,1,1},
          {yamerl_collection_start,1,1,
            {yamerl_tag,1,1,{non_specific,"?"}},
            block,sequence},
          {yamerl_doc_start,1,1,{1,2},_},
          {yamerl_stream_start,1,1,utf8}
        ]
      },
      yamerl_parser:file(?FILENAME)
    ).
